package com.taomus.mytools.other.utils;


public final class CommonUtils {

	private final static String osname = System.getProperty("os.name");

	public static boolean isWindows() {
		if (osname.startsWith("Windows")) {
			return true;
		}
		return false;
	}

	public static boolean isLinux() {
		if (osname.startsWith("Linux")) {
			return true;
		}
		return false;
	}

	public static boolean isMac() {
		if (osname.startsWith("Mac")) {
			return true;
		}
		return false;
	}

	public static String getClassPath() {
		return getClassPath(null);
	}
	public static String getClassPath(Class<?> zlass) {
		if(zlass == null) {
			return Thread.currentThread().getContextClassLoader().getResource("").getPath();
		}else {
			return zlass.getResource("").getPath();
		}
	}
	public static String getUserDir() {
		return System.getProperty("user.dir");
	}
}
